Skip to content

Cut executor prompt replay through checkpoint-first guidance#375

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/reduce-prompt-replay-checkpoint-guidance-2026-04-23-15-43
Apr 23, 2026
Merged

Cut executor prompt replay through checkpoint-first guidance#375
NagyVikt merged 1 commit intomainfrom
agent/codex/reduce-prompt-replay-checkpoint-guidance-2026-04-23-15-43

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

Guardex already warned about fragmented loops, but it still underspecified how to collapse raw terminal chatter into compact state. This tightens the repo contract, managed template, and gx prompt task loop so operators checkpoint after milestones, keep only the latest checkpoint summaries in active context, and treat execution logs as separate from reasoning context.

Constraint: Guardex does not control Codex internal prompt assembly, so the fix had to land in repo guidance and prompt surfaces rather than the launcher.
Rejected: Patch templates/scripts/codex-agent.sh invocation | launcher only starts Codex and already records compact session metadata.
Confidence: medium
Scope-risk: narrow
Directive: Keep future token-efficiency guidance anchored on checkpoint summaries and summarized tool outcomes instead of longer anti-loop prose.
Tested: node --test test/prompt.test.js; openspec validate agent-codex-reduce-prompt-replay-checkpoint-guidance-2026-04-23-15-43 --type change --strict
Not-tested: openspec validate --specs (repo reported no items found to validate)
@NagyVikt NagyVikt merged commit 4b9525a into main Apr 23, 2026
@NagyVikt NagyVikt deleted the agent/codex/reduce-prompt-replay-checkpoint-guidance-2026-04-23-15-43 branch April 23, 2026 13:48
NagyVikt added a commit that referenced this pull request Apr 23, 2026
The original implementation lane merged cleanly, but its tasks.md cleanup section still showed the finish steps as incomplete. This backfills the PR URL, merge timestamp, and worktree-prune proof so the merged OpenSpec record matches what actually happened.

Constraint: The evidence patch had to land after PR #375 merged because the exact mergedAt timestamp and cleanup result were only known at finish time.
Rejected: Leave the stale cleanup boxes on main | cleanup evidence is part of the repo workflow contract and would misstate merged truth.
Confidence: high
Scope-risk: narrow
Directive: When a finish flow merges a change before tasks.md records PR and MERGED proof, follow with a tiny bookkeeping lane instead of leaving stale cleanup boxes behind.
Tested: git status --short; git diff --stat; gh pr view agent/codex/reduce-prompt-replay-checkpoint-guidance-2026-04-23-15-43 --json url,state,number,headRefName,baseRefName,mergedAt; git worktree list
Not-tested: automated test suite (docs-only bookkeeping patch)

Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant